<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width"/>
    <title>XX - demo平台</title>
    <link rel="icon" href="/favicon.ico" type="image/x-icon">
    <link href="/css/css.css" rel="stylesheet"/>
    <link href="/css/pager.css" rel="stylesheet"/>
    <link href="/css/base/jquery.ui.all.css" rel="stylesheet"/>
    <script src="/js/scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="/js/scripts/jquery-ui-1.8.24.js" type="text/javascript"></script>
    <script src="/js/datepicker/WdatePicker.js"></script>
    <script src="/js/common.js"></script>
    <style>
        .mydetail{margin-bottom: 20px;}
    </style>
</head>
<body>
<div class="header">
    <span style="color: white; font-size: 25px; margin-left: 25px; font-weight: bold; font-family: 微软雅黑;">Demo 平台</span>
    <div class="fr mr10">
        {{if .SessionUser}}
        <span id="toptips" class="remind fl"><span id="toptips1"></span>{{.SessionUser.UserName}}</span>
            <a id="btnLoginOut" href="#" class="fl">退出</a>
        {{else}}
            <a href="/admin/home/index" class="fl">登录</a>
        {{end}}

</div>
</div>
<div class="content w">
    {{template "menu" .}}
    <div class="main_cont">
        {{template "content" .}}
    </div>
</div>
<script>
    $(function () {
        // 登录
        $("#btnLoginOut").click(function () {
            $.ajax({
                url: '/admin/home/loginOut/',
                type: "post",
                data: {
                },
                success: function (data) {
                    if (data.code === 200) {
                        window.location.href = "/admin/home/index/";
                    } else {
                        alert(data.msg)
                    }
                }
            });
        });
    });
</script>
</body>
{{template "footer" .}}
</html>
